Skip to content

Don't include display name in alerting policy template user labels#1237

Merged
pintofloyed merged 1 commit into
masterfrom
drop-display-name-userlabel
Jun 17, 2026
Merged

Don't include display name in alerting policy template user labels#1237
pintofloyed merged 1 commit into
masterfrom
drop-display-name-userlabel

Conversation

@yqlu

@yqlu yqlu commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

See b/524991671 for context. GCP user labels must conform to strict API-level regex patterns [\p{Ll}\p{Lo}\p{N}_-]{0,63} so when agent display names start with an upper case letter we get an alert policy creation error. It would be brittle to attempt to sanitize arbitrary display names dynamically (e.g. toLowercase()) because there are other cases (special characters, length limits, whitespaces...).

Instead, we should just add display name to the alert documentation field so that oncallers can see which agent this is firing for in the notification. The labels can just be resource name and location which is deterministic and will always pass validation.

See b/524991671 for context. GCP user labels must conform to strict API-level regex patterns [\p{Ll}\p{Lo}\p{N}_-]{0,63} so when agent display names start with an upper case letter we get an alert policy creation error. It would be brittle to attempt to sanitize arbitrary display names dynamically (e.g. toLowercase()) because there are other cases (special characters, length limits, whitespaces...).

Instead, we should just add display name to the alert documentation field so that oncallers can see which agent this is firing for in the notification. The labels can just be resource name and location which is deterministic and will always pass validation.
@yqlu
yqlu requested a review from pintofloyed June 17, 2026 14:41
@pintofloyed
pintofloyed merged commit 9bdc313 into master Jun 17, 2026
11 checks passed
@pintofloyed
pintofloyed deleted the drop-display-name-userlabel branch June 17, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants